import { z } from "zod";
import { CodeErrorDto } from "../dto";
import { DtoOmitType, DtoPickType, classDto2Zod } from "src/utils";
import { ApiProp } from 'src/decorator/swagger';

/** 新增代码异常记录 */
export class CodeErrorAddDto extends DtoOmitType(CodeErrorDto, [
  'id', 'createTime', 'updateTime', 'times', 'messageId'
]) {
  @ApiProp({ desc: '错误信息' })
  message!: string
};

/** 新增代码异常记录 */
export const CodeErrorAddZod = classDto2Zod(CodeErrorAddDto);
